﻿using Prism.Mvvm;
using TiaoTiaoCode.AutoUpdate.ClientUI.Enums;

namespace TiaoTiaoCode.AutoUpdate.ClientUI.Models
{
    /// <summary>
    /// 更新文件列表对象
    /// </summary>
    public class FileInfoModel : BindableBase
    {
        private FileUpgradeState state;
        private string errMsg = default!;

        /// <summary>
        /// 文件Id
        /// </summary>
        public string FileId { get; set; } = default!;

        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName { get; set; } = default!;

        /// <summary>
        /// 文件版本号
        /// </summary>
        public string FileVersion { get; set; } = default!;

        /// <summary>
        /// 文件状态
        /// </summary>
        public FileUpgradeState State
        {
            get { return state; }
            set { SetProperty(ref state, value); }
        }

        /// <summary>
        /// 消息
        /// </summary>
        public string ErrMsg
        {
            get { return errMsg; }
            set { SetProperty(ref errMsg, value); }
        }
    }
}
